/*
 * @Autor: dc
 * @Date: 2022-03-30 17:35:03
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-10-18 15:47:16
 * @Description: 
 */
import store from '../store'


// 配置操作栏方法
export const actionBarConfig = (data,time) => {
    return ()=>{
        // store.dispatch({ type: 'actionBarConfig', data })
        let actionBarInterval = setInterval(()=>{
            if(data.prepare>0){
                data.prepare -- ;
            }else{
                clearInterval(actionBarInterval)
            }
            store.dispatch({ type: 'actionBarConfig', data })
        },time)
    }
}